package fr.efrei.musicpliz.dao;

import java.util.List;

import fr.efrei.musicpliz.dto.CompteDto;
import fr.efrei.musicpliz.entity.Compte;
import fr.efrei.musicpliz.entity.Message;

/**
 * Data Access Object to grant access to all the account-entities.
 * fetch, update, insert and delete statements should be encapsulated by this DAO
 */
public interface MessageDao extends AbstractDao<Message> {
	

	/**
	 * Fetches all existing <b>messages</b> of the speciefied account
	 * 
	 * @param <C>
	 * 		Type of the Compte you d'like to receive
	 * @param instance
	 * 		provide an instance for extracting the class-information
	 * 
	 * @return List with all <b>specific comptes</b> saved on the db
	 */
	List<Message> getReceived(CompteDto compte);

	/**
	 * Fetches all existing <b>messages</b> of the speciefied account
	 * 
	 * @param <C>
	 * 		Type of the Compte you d'like to receive
	 * @param instance
	 * 		provide an instance for extracting the class-information
	 * 
	 * @return List with all <b>specific comptes</b> saved on the db
	 */
	List<Message> getSent(CompteDto compte);
	
	int getNewReceivedCount(CompteDto compte);
	
}
